//
//  DeviceModel.h
//  Siterwell Link
//
//  Created by tracyhenry on 2022/6/14.
//  Copyright © 2022 Siterwell. All rights reserved.
//

#ifndef DeviceModel_h
#define DeviceModel_h
#import <JSONModel/JSONModel.h>

@interface DeviceModel:JSONModel

@property(nonatomic , strong) NSString<Optional> *version;

@property(nonatomic , strong) NSString<Optional> *ssid;

@property(nonatomic , strong) NSNumber<Optional> *rssi;

@property(nonatomic , strong) NSString<Optional> *sn;

@property(nonatomic , strong) NSString<Optional> *mac;

@property(nonatomic , strong) NSNumber<Optional> *state;

@property(nonatomic , strong) NSNumber<Optional> *deviceShare;

@property(nonatomic , strong) NSString<Optional> *thingTypeName;

@property(nonatomic , strong) NSNumber<Optional> *isGateway;

@property(nonatomic , strong) NSString<Optional> *softwareVersion;

@property(nonatomic , strong) NSString<Optional> *firmwareVersion;

@property(nonatomic,strong)NSString<Optional> *deviceName;

@property(nonatomic,strong) NSString<Optional> * imageUrl;

@property(nonatomic , strong) NSString<Optional> *thingName;

@property(nonatomic,strong) NSString<Optional> * parentId;

@property(nonatomic,strong) NSNumber<Optional> * roomId; //房间的序列号0-9


@property(nonatomic,strong) NSString<Optional> * createTime;


@property(nonatomic,strong) NSString<Optional> * onlineAt;

@property(nonatomic,strong) NSString<Optional> * offlineAt;

@property(nonatomic,strong) NSString<Optional> * reportTime;

@property(nonatomic,strong) NSString<Optional> * alarm;

@property(nonatomic,strong) NSNumber<Optional> * isShared;

@property(nonatomic,strong) NSString<Optional> * devType;

-(NSString *)getLenStr:(NSString *)content;


-(NSString *)getContent;


-(long)getAlarmLevel;

-(BOOL)isOnline;

-(BOOL)isLowBattery;

-(void)setAnylisStatus;

-(void)setBackAnylisStatusStr1:(NSString *)str1 withStr2:(NSString *)str2;


-(instancetype)initWithDic:(NSDictionary *)dic withThingName:(NSString *)thingName;

-(instancetype)initWithDicSub:(NSDictionary *)dic withThingName:(NSString *)thingName;

-(nonnull NSMutableArray *)getShadowList;
@end

#endif /* DeviceModel_h */
